@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Lora:wght@400;500;600;700&display=swap");
@import "./scrollbar.css";

@tailwind base;
@tailwind components;
@tailwind utilities;

@source "../../node_modules/streamdown/dist/index.js";

/* https://www.joshwcomeau.com/css/custom-css-reset/ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

p {
  text-wrap: pretty;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  text-wrap: balance;
}

#root,
#__next {
  isolation: isolate;
  height: 100%;
}

/* https://github.com/gitbutlerapp/gitbutler/blob/master/apps/desktop/src/styles/styles.css */

html,
body {
  height: 100vh;
  width: 100vw;
  overflow-y: hidden;

  user-select: none;
  overscroll-behavior: none;
}

@layer base {
  * {
    user-select: none;
  }

  input,
  textarea,
  [contenteditable="true"] {
    user-select: text;
  }
}

@layer utilities {
  .select-text-deep {
    user-select: text !important;
  }

  .select-text-deep * {
    user-select: text !important;
  }
}

/* Search result highlighting styles */
.search-result {
  background-color: #ffeb3b;
  border-radius: 2px;
  padding: 1px 0;
}

.search-result-current {
  background-color: #31e054 !important;
  border-radius: 2px;
  padding: 1px 0;
}
